﻿@model Budgeter.ViewModels.Budget.Index.ViewModel

@{
    ViewBag.Title = "Index";
}

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Receipt Number
        </th>
        <th>
            Name
        </th>
        <th>
            Created
        </th>
        <th>
            Income F/N
        </th>
        <th>
            Expense F/N
        </th>
        <th></th>
    </tr>

@foreach (var item in Model.Items) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ReceiptNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedUtc)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IncomeFortnightlyTotal)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExpenseFortnightlyTotal)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.ReceiptNumber }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.ReceiptNumber })
        </td>
    </tr>
}

</table>
